-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ccip-4308 Test logic optimizations for docker node tests #15392
Conversation
e.Logger.Info("ccip multicall already deployed", "addr", mc3.Address) | ||
if mc3 != nil { | ||
e.Logger.Info("ccip multicall already deployed", "addr", mc3.Address) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙌
var srcToken *burn_mint_erc677.BurnMintERC677 | ||
var srcPool *burn_mint_token_pool.BurnMintTokenPool | ||
var dstToken *burn_mint_erc677.BurnMintERC677 | ||
var dstPool *burn_mint_token_pool.BurnMintTokenPool |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit/ can combine into one var decl
@@ -130,7 +134,20 @@ func NewLocalDevEnvironment( | |||
|
|||
// fund the nodes | |||
zeroLogLggr := logging.GetTestLogger(t) | |||
FundNodes(t, zeroLogLggr, testEnv, cfg, don.PluginNodes()) | |||
// check if we can fund in parallel |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When wouldn't we want to fund in parallel? Real testnets?
@@ -437,6 +455,12 @@ func CreateDockerEnv(t *testing.T) ( | |||
evmNetworks[i].URLs = rpcProvider.PrivateWsUrsl() | |||
} | |||
env.EVMNetworks = append(env.EVMNetworks, &evmNetworks[i]) | |||
// if number of private keys is more than 1, we can fund the nodes in parallel |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I see, is this logic really required? Why not just always fund in parallel? Can't imagine it'd add that much overhead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean change it to having >2 keys in private keys always and fail otherwise?
@@ -173,28 +178,41 @@ func TestUSDCTokenTransfer(t *testing.T) { | |||
}, | |||
} | |||
|
|||
for i, tt := range tcs { | |||
tcs[i].initialBalances = make(map[common.Address]*big.Int) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this doesn't seem right. Every test can pick any token / any chain to transfer. Therefore any sequential test relies on the outcome of the previous one. For instance, if test1 sends a token from A -> B, and test2 does a similar work, you will get the wrong initial balance for test2, because in the meantime that balance will be changed by test1 execution.
If it doesn't fails then probably it's mainly because we pick different combinations for every test case. However, adding new test case will probably break it, no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Every test is using a different receiver right? will that not make it separate from each other
Requires
Supports